<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org" lang="en">

<head>
    <title>管理员注册</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <!--引入bootstrap-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
    <link rel="stylesheet" href="../../css/userRegister.css">
</head>

<body>

<div style="width:580px;height: 450px;border: 1px solid #ccc;padding: 60px;position: absolute;left: 30%;top:20%">
    <form th:action="@{/register/adminRegister}">
        <div class="form-group row">
            <label for="userName" class="col-sm-2 col-form-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="userName" placeholder="请输入用户名" th:name="adminName">
            </div>
        </div>
        <div class="form-group row">
            <label for="password" class="col-sm-2 col-form-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" id="password" placeholder="请输入密码" th:name="password">
            </div>
        </div>

        <div class="form-group row">
            <label for="submit" class="col-sm-2 col-form-label">提交</label>
            <div class="col-sm-10">
                <input type="submit" class="form-control" id="submit" style="background-color: blanchedalmond">
            </div>
        </div>
        <div th:if="${ msg == '成功' }"  class="alert alert-danger" role="alert" style="text-align: center;color: red">
            <button type="button" class="btn btn-success" th:onclick="index()">返回首页</button>
            &nbsp;&nbsp;&nbsp;
            注册成功
        </div>
        <div th:if="${ msg == '失败' }"  class="alert alert-secondary" role="alert" style="text-align: center;color: red">
            <button type="button" class="btn btn-success" th:onclick="index()"> 返回首页</button>
            注册失败
        </div>
    </form>
</div>



<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
</body>
<script>
    function index() {
        window.location.href="index.html";
    }
</script>

</html>